<?php
    session_start();

    $con = mysql_connect('localhost','root','chenpo');
    if(!$con)
    {
        die('数据库连接有误:'.mysql_error());
    }
    mysql_select_db("reader",$con);
    $sql_selectuserrss = "select rss.rss_description as rssdesc,rss.rss_addr as rssaddr,user_rss.user_rss_id as userrssid from user_rss left join rss on user_rss.rss_id=rss.rss_id where user_rss.user_id='".$_SESSION["userid"]."'";
    $result_selectuserrss = mysql_query($sql_selectuserrss);

    echo "<table>
            <tr>
                <td>源描述</td>
                <td>源地址</td>
                <td>编辑</td>
            </tr>";
    while($row = mysql_fetch_array($result_selectuserrss))
    {
        echo "<tr>";
        echo "<td>".$row["rssdesc"]."</td>";
        echo "<td>".$row["rssaddr"]."</td>";
        echo "<td><input type=\"button\" value=\"修改\" /><input type=\"button\" value=\"删除\" /></td>";
        echo "</tr>";
    }
    echo "</table>";

    mysql_close($con);
?>
